package com.guigu.qingcheng.service;

import com.guigu.qingcheng.pojo.goods.Goods;
import com.guigu.qingcheng.pojo.goods.TbCategory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * 远程调用CateGoryService接口
 */
@Component
@FeignClient("service-goods")
public interface GoodsServiceFeign {

    @GetMapping("/goods/category/findCategoryList")
    List<Map> findCategoryList();

    @GetMapping("/goods/spu/findGoodsBySpuId")
    Goods findGoodsById(@RequestParam("spuId") String spuId);

    @GetMapping("/goods/category/findById2")
    TbCategory findById2(@RequestParam("id") int id);

    @GetMapping("/goods/sku/price")
    Integer findPrice(@RequestParam("id") String id);
}
